Optimal. Leaf size=355 \[ -\frac {2 a (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 b^2 d}+\frac {2 \sqrt {a+b} (3 A b-(a-b) C) \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 b d}-\frac {2 A \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}+\frac {2 C \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 355, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4142, 4143,
4006, 3869, 3917, 4089} \begin {gather*} \frac {2 \sqrt {a+b} (3 A b-C (a-b)) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 b d}-\frac {2 A \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d}-\frac {2 a C (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 b^2 d}+\frac {2 C \tan (c+d x) \sqrt {a+b \sec (c+d x)}}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 4006
Rule 4089
Rule 4142
Rule 4143
Rubi steps
\begin {align*} \int \sqrt {a+b \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {2 C \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{3 d}+\frac {2}{3} \int \frac {\frac {3 a A}{2}+\frac {1}{2} b (3 A+C) \sec (c+d x)+\frac {1}{2} a C \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {2 C \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{3 d}+\frac {2}{3} \int \frac {\frac {3 a A}{2}+\left (-\frac {a C}{2}+\frac {1}{2} b (3 A+C)\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx+\frac {1}{3} (a C) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 a (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 b^2 d}+\frac {2 C \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{3 d}+(a A) \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx+\frac {1}{3} (3 A b-(a-b) C) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 a (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 b^2 d}+\frac {2 \sqrt {a+b} (3 A b-(a-b) C) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 b d}-\frac {2 A \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}+\frac {2 C \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 11.17, size = 570, normalized size = 1.61 \begin {gather*} \frac {4 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \left (2 i a (a-b) C \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} E\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right )+2 i (a-b) b (3 A+C) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} F\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right )-12 i a A b \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right )-a \sqrt {\frac {-a+b}{a+b}} C \cos (c+d x) (b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 b \sqrt {\frac {-a+b}{a+b}} d (b+a \cos (c+d x)) (A+2 C+A \cos (2 c+2 d x))}+\frac {\cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \left (\frac {4 a C \sin (c+d x)}{3 b}+\frac {4}{3} C \tan (c+d x)\right )}{d (A+2 C+A \cos (2 c+2 d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1509\) vs.
\(2(320)=640\).
time = 0.23, size = 1510, normalized size = 4.25
method | result | size |
default | \(\text {Expression too large to display}\) | \(1510\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sqrt {a + b \sec {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________